﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using LuaFramework;

/// <summary>
/// 网络消息接受命令，用于转发给Lua逻辑层
/// </summary>
public class SocketCommand : ControllerCommand {

    public override void Execute(IMessage message)
    {
        object data = message.Body;
        if (data == null) return;
        KeyValuePair<int, ByteBuffer> buffer = (KeyValuePair<int, ByteBuffer>)data;

        Util.CallMethod("Network", "OnSocket", buffer.Key, buffer.Value);
	}
}
